<%@ page language="java" pageEncoding="UTF-8" import="java.util.*, java.text.*,com.zjut.zs.util.tools.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>表单</title>
	<link rel="stylesheet" type="text/css" href="../plugins/layuiadmin/layui/css/layui.css" media="all">
</head>
<%
AnConfigManager cmanager = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
AnConfig obj = cmanager.getConfigInfoByName("系统banner地址");
if (null==obj) {
	obj = new AnConfig();
	obj.setCoClass("系统banner配置");
	obj.setCoName("系统banner地址");
	obj.setCoType("单信息");
	obj.setCoOrder(0);
	cmanager.addData(obj);
}
%>
<body class="body">

<form class="layui-form layui-from-pane" action="/addCollector" style="margin-top:20px" method="post">
        <div class="layui-col-md6">        
      	<div class="layui-card " style="padding: 15px;">
		  <div class="layui-form-item">
            <div class="layui-inline">
              <div class="layui-input-inline">
              	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/plugins/webupload/css/upload/upload.css" />
				<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/plugins/webupload/plugin/ueditor/third-party/webuploader/webuploader.css">				
				<script type="text/javascript" src="<%=request.getContextPath() %>/plugins/webupload/plugin/ueditor/third-party/jquery-3.5.1.min.js"></script>
				<script src="<%=request.getContextPath() %>/plugins/webupload/plugin/ueditor/third-party/webuploader/webuploader.min.js"></script>
				 
					<div id="wrapper" style="width:600px;">
                    <img src="<%=request.getContextPath() %>/<%=obj.getCoValue() %>" id="pictureimg" width="600" />
							<div id="container">
								<div id="uploader">
									<div class="queueList">
										<div id="dndArea" class="placeholder" style="min-height:58px;padding-top:0px;">
											<div id="filePicker"></div>
											<br><p>点击添加图片按钮上传</p>
										</div>
									</div>
									<div class="statusBar" style="display: none;">
										<div class="progress">
											<span class="text">0%</span> <span class="percentage"></span>
										</div>
										<div class="info" style="font-size:10pt;line-height:1"></div>
										<div class="btns">
											<div id="filePicker2" style="display: none;"></div>
											<div class="uploadBtn" style="font-size:10px;margin-left:8px;padding:0 5px;">开始上传</div>
										</div>
									</div>
								</div>
							</div>
						</div>
				<script type="text/javascript" src="<%=request.getContextPath() %>/plugins/webupload/scripts/upload/adimgupload.js"></script>	  
				<input type="text" name="coValue" id="coValue" lay-verify="" autocomplete="off" class="layui-input" style="display:none;" value="<%=obj.getCoValue() %>">
              </div>
            </div>
          </div>
        </div>
      </div>
  
    
    <div class="layui-form-item">
        <div class="layui-input-block">
      		<input type="text" name="coId" class="layui-input" value="<%=obj.getCoId() %>" style="display:none;">
      		<input type="text" name="coName" class="layui-input" value="<%=obj.getCoName() %>" style="display:none;">
      		<input type="text" name="coClass" class="layui-input" value="<%=obj.getCoClass() %>" style="display:none;">
      		<input type="text" name="coType" class="layui-input" value="单信息" style="display:none;">
      		<input type="text" name="coOrder" class="layui-input" value="0" style="display:none;">
            <button class="layui-btn  layui-btn-submit " lay-submit="" lay-filter="demo1">保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="../plugins/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['form','layer','jquery'], function(){
        var form = layui.form
                ,layer = layui.layer
                 ,$=layui.jquery,
                  table= layui.table
        //监听提交
        form.on('submit(demo1)', function(data){
            var rowStr = data.field;
            $.ajax({
              	type:"post",
              	url:"../anConfigUpdate.action",
              	data:{
              		rowstr:JSON.stringify(rowStr)
              	},
              	async:true,
              	cache:false,
              	success:function(res){
              		layer.msg('提交成功');
              	}
              });
            return false;
            
        });
    });
</script>
</body>
</html>